﻿
@{
    ViewBag.Title = "Form";
    Layout = "~/Views/Shared/_Form.cshtml";
}
<style>
    .form .formValue input.form-control {
        height: 34px;
        line-height: 34px;
    }

    .form-control {
        padding: 0px;
    }

    .autocomplete-suggestions {
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
        box-sizing: border-box;
        border: 1px solid #999;
        background: #FFF;
        cursor: default;
        overflow: auto;
        -webkit-box-shadow: 1px 4px 3px rgba(50, 50, 50, 0.64);
        -moz-box-shadow: 1px 4px 3px rgba(50, 50, 50, 0.64);
        box-shadow: 1px 4px 3px rgba(50, 50, 50, 0.64);
    }

    .autocomplete-selected {
        background: #F0F0F0;
    }

    .autocomplete-suggestion {
        padding: 2px 5px;
        white-space: nowrap;
        overflow: hidden;
    }

    .autocomplete-no-suggestion {
        padding: 2px 5px;
    }
</style>
<script>
    var resultData = {};
    var F_Id = $.request("F_Id");
    var contactId = $.request("contactId");
    $(function () {
        GetInit();
        $("#F_ActivityCityId").select2({ multiple: true });
        initEntity();
    });

    function initEntity() {
        $.ajax({
            url: "/ClientManager/DemandInfos/GetMemandEntity?F_Id=" + F_Id +"",
            dataType: "json",
            async: false,
            success: function (data) {
                if (data != null) {
                    $("#F_ClientType").val(data["F_ClientType"]);
                    $("#hd_ClientName").val(data["F_ClientId"]);
                    $("#F_Source").val(data["F_Source"]);
                    $("#F_ClientName").val(data["F_ClientName"]);
                    $("#F_ClientLevel").val(data["F_ClientLevel"]);
                    if (data["F_CityId"] != null) {
                        $("#F_CityId").val(data["F_CityId"].split(',')).trigger('change');
                    }
                    ChangeCityData();
                    if (data["F_AreaId"] != null) {
                        $("#F_AreaId").val(data["F_AreaId"].split(',')).trigger('change');
                    }
                    $("#F_Address").val(data["F_Address"]);
                    $("#F_MappingId").val(data["MappingName"]);
                    $("#hd_F_MappingId").val(data["MappingId"]);
                    $("#F_ProjectId").val(data["F_ProjectName"]);
                    $("#hd_ProjectId").val(data["ProjectId"]);
                    $("#F_BrandId").val(data["F_BrandName"]);
                    $("#F_Contact").val(data["F_Contact"]);
                    $("#F_DepartmentId").val(data["F_DepartmentId"]);
                    $("#F_PositionId").val(data["F_PositionId"]);
                    $("#F_Phone").val(data["F_Phone"]);
                    $("#F_Telephone").val(data["F_Telephone"]);
                    $("#F_Mail").val(data["F_Mail"]);
                    $("#F_ActivityTheme").val(data["F_ActivityTheme"]);
                    $("#F_ActivityType").val(data["F_ActivityType"]);
                    $("#F_DemandCash").val(data["F_DemandCash"]);
                    $("#F_ZkIndustryId").val(data["F_ZkIndustryId"]);
                    $("#F_ActivityStartDate").val(data["F_ActivityStartDate"]);
                    $("#F_ActivityEndDate").val(data["F_ActivityEndDate"]);
                    if (data["F_ActivityCityId"] != null) {
                        $("#F_ActivityCityId").val(data["F_ActivityCityId"].split(',')).trigger('change');
                    }
                    $("#F_SiteType").val(data["F_SiteType"]);
                    $("#F_SiteArea").val(data["F_SiteArea"]);
                    $("#F_Height").val(data["F_Height"]);
                    $("#F_Note").val(data["F_Note"]);
                    $("#F_Mark").val(data["F_Mark"]);
                    $("#F_Source").val(data["F_Source"]);
                    $("#F_PersionNumber").val(data["F_PersionNumber"]);
                    $("input[name='F_State'][value=" + data["F_State"] + "]").attr("checked", true);
                    $("input[name='F_Sex'][value=" + data["F_Sex"] + "]").attr("checked", true);                    
                }
            }, error: function (XMLHttpRequest, textStatus, errorThrown) {
            }
        });
    }

    function InitControl() {
        var F_ClientType = resultData.F_ClientType;
        for (var i = 0; i < F_ClientType.length; i++) {
            $("#F_ClientType").append("<option value='" + F_ClientType[i].F_ItemCode + "'>" + F_ClientType[i].F_ItemName + "</option>");
        }

        var F_CompanyType = resultData.F_CompanyType;
        for (var i = 0; i < F_CompanyType.length; i++) {
            $("#F_CompanyType").append("<option value='" + F_CompanyType[i].F_ItemCode + "'>" + F_CompanyType[i].F_ItemName + "</option>");
        }

        var F_ClientLevel = resultData.F_ClientLevel;
        for (var i = 0; i < F_ClientLevel.length; i++) {
            $("#F_ClientLevel").append("<option value='" + F_ClientLevel[i].F_ItemCode + "'>" + F_ClientLevel[i].F_ItemName + "</option>");
        }

        var F_IndustryId = resultData.F_IndustryId;
        for (var i = 0; i < F_IndustryId.length; i++) {
            $("#F_IndustryId").append("<option value='" + F_IndustryId[i].F_ItemCode + "'>" + F_IndustryId[i].F_ItemName + "</option>");
            $("#F_ZkIndustryId").append("<option value='" + F_IndustryId[i].F_ItemCode + "'>" + F_IndustryId[i].F_ItemName + "</option>");
        }

        var F_DepartmentId = resultData.F_DepartmentId;
        for (var i = 0; i < F_DepartmentId.length; i++) {
            $("#F_DepartmentId").append("<option value='" + F_DepartmentId[i].F_ItemCode + "'>" + F_DepartmentId[i].F_ItemName + "</option>");
        }

        var F_PositionId = resultData.F_PositionId;
        for (var i = 0; i < F_PositionId.length; i++) {
            $("#F_PositionId").append("<option value='" + F_PositionId[i].F_ItemCode + "'>" + F_PositionId[i].F_ItemName + "</option>");
        }

        var F_ActivityType = resultData.F_ActivityType;
        var First_ActivityType = resultData.First_ActivityType;
        var strHtml = "";
        for (var j = 0; j < First_ActivityType.length; j++) {
            strHtml += "<option style=\"font-weight:bold;\" label='" + First_ActivityType[j]["F_ItemName"] + "'>";
            for (var i = 0; i < F_ActivityType.length; i++) {
                if (First_ActivityType[j].F_ItemCode == F_ActivityType[i].F_Description) {
                    strHtml += "<option value='" + F_ActivityType[i].F_ItemCode + "'>" + "&nbsp;&nbsp;&nbsp;&nbsp;" + F_ActivityType[i].F_ItemName + "</option>";
                }
            }
            strHtml += "</option>"; 
        }
        $("#F_ActivityType").append(strHtml);

        var F_ActivityCityId = resultData.F_ActivityCityId;
        for (var i = 0; i < F_ActivityCityId.length; i++) {
            $("#F_ActivityCityId").append("<option value='" + F_ActivityCityId[i].F_EnCode + "'>" + F_ActivityCityId[i].F_FullName + "</option>");
        }

        var F_SiteType = resultData.F_SiteType;
        for (var i = 0; i < F_SiteType.length; i++) {
            $("#F_SiteType").append("<option value='" + F_SiteType[i].F_ItemCode + "'>" + F_SiteType[i].F_ItemName + "</option>");
        }

        var F_CityId = resultData.F_CityId;
        for (var i = 0; i < F_CityId.length; i++) {
            $("#F_CityId").append("<option value='" + F_CityId[i].F_EnCode + "'>" + F_CityId[i].F_FullName + "</option>");
        }

        //var F_AreaId = resultData.F_AreaId;
        //for (var i = 0; i < F_AreaId.length; i++) {
        //    $("#F_AreaId").append("<option value='" + F_AreaId[i].F_ItemCode + "'>" + F_AreaId[i].F_ItemName + "</option>");
        //}

        var Clients = [];
        var SiteClients = resultData.SiteClients;
        for (var i = 0; i < SiteClients.length; i++) {
            Clients.push({ value: SiteClients[i].F_ClientName, data: SiteClients[i].F_Id });
        }

        $("#F_ClientName").autocomplete({
            lookup: Clients,
            onSelect: function (suggestion) {
                $("#hd_ClientName").val(suggestion.data);
                for (var i = 0; i < resultData.SiteClients.length; i++) {
                    if (suggestion.data == resultData.SiteClients[i].F_Id) {
                        $("#F_CompanyType").val(resultData.SiteClients[i].F_CompanyType);
                        $("#F_ClientLevel").val(resultData.SiteClients[i].F_ClientLevel);
                        $("#F_CityId").val(resultData.SiteClients[i].F_CityId);
                        ChangeCityData();
                        $("#F_Address").val(resultData.SiteClients[i].F_Address);
                        $("#F_IndustryId").val(resultData.SiteClients[i].F_IndustryId);
                    }
                }
                ProjectChange(suggestion.data);
            }
        });

        $("#F_MappingId").autocomplete({
            lookup: Clients,
            onSelect: function (suggestion) {
                $("#hd_F_MappingId").val(suggestion.data);
            }
        });
    }

    function ProjectChange(f_fartherId) {
        var Projects = [];
        var siteProjects = resultData.Projects;
        for (var i = 0; i < siteProjects.length; i++) {
            if (siteProjects[i].F_ClientId == f_fartherId) {
                Projects.push({ value: siteProjects[i].F_ProjectName, data: siteProjects[i].F_Id });
            }
        }

        $("#F_ProjectId").autocomplete({
            lookup: Projects,
            onSelect: function (suggestion) {
                $("#hd_ProjectId").val(suggestion.data);
                ProjectInfo(suggestion.data);
            }
        });
    }

    var contracts;
    function ProjectInfo(projectId) {
        $.ajax({
            url: "/ClientManager/ClientInfos/GetProjectInfo?F_Id=" + projectId,
            dataType: "json",
            async: false,
            success: function (data) {
                contracts = data;
                if (data.length > 1) {
                    $("#contactArea").show();
                    $("#contactNum").html(data.length);
                    $("#contractList").empty();
                    for (var i = 0; i < data.length; i++) {
                        if (i == 0) {
                            $("#contractList").append("<li id=" + data[i]["F_Id"] + "><a style=\"cursor:pointer;\" onclick=\"ChangeContract(this)\" class=\"active\">" + data[i]["F_Contact"] + "</a></li>");
                            $("#F_Contact").val(data[i]["F_Contact"]);
                            $("#F_DepartmentId").val(data[i]["F_DepartmentId"]);
                            $("#F_PositionId").val(data[i]["F_PositionId"]);
                            $("#F_Phone").val(data[i]["F_Phone"]);
                            $("#F_Telephone").val(data[i]["F_Telephone"]);
                            $("#F_Mail").val(data[i]["F_Mail"]);
                            $("input[name='F_Sex'][value=" + data[i]["F_Sex"] + "]").attr("checked", true);
                        } else {
                            $("#contractList").append("<li id=" + data[i]["F_Id"] + "><a style=\"cursor:pointer;\" onclick=\"ChangeContract(this)\">" + data[i]["F_Contact"] + "</a></li>");
                        }
                    }
                } else {
                    $("#contactArea").hide();
                    $("#F_Contact").val(data[0]["F_Contact"]);
                    $("#F_DepartmentId").val(data[0]["F_DepartmentId"]);
                    $("#F_PositionId").val(data[0]["F_PositionId"]);
                    $("#F_Phone").val(data[0]["F_Phone"]);
                    $("#F_Telephone").val(data[0]["F_Telephone"]);
                    $("#F_Mail").val(data[0]["F_Mail"]);
                    $("input[name='F_Sex'][value=" + data[0]["F_Sex"] + "]").attr("checked", true);
                }
            },
            error: function (XMLHttpRequest, textStatus, errorThrown) { }
        });
    }

    function ChangeCityData() {
        var id = $("#F_CityId").val();
        $("#F_AreaId").empty();
        var F_AreaId = resultData.F_AreaId;
        for (var i = 0; i < F_AreaId.length; i++) {
            if (F_AreaId[i].F_ParentId == id) {
                $("#F_AreaId").append("<option value='" + F_AreaId[i].F_ItemCode + "'>" + F_AreaId[i].F_ItemName + "</option>");
            }
        }
    }

    function GetInit() {
        resultData = getCache("DEMAND_DETAIL");
        if (!resultData || resultData.length <= 0) {
            $.ajax({
                url: "/ClientManager/DemandInfos/GetItemListJson",
                dataType: "json",
                async: false,
                success: function (data) {
                    resultData = data;
                    InitControl();
                    setCache("DEMAND_DETAIL", data);
                }, error: function (XMLHttpRequest, textStatus, errorThrown) {
                }
            });
        } else {
            InitControl();
        }
    }

    function ChangeClientType() {
        var F_ClientType = $("#F_ClientType").val();
        if (F_ClientType == "1") {
            $("#F_CompanyType").attr("disabled", "disabled");
            $("#F_CompanyType").css("background-color", "#ddd");
            $("#F_MappingId").attr("disabled", "disabled");
            $("#F_MappingId").css("background-color", "#ddd");

            $("#F_IndustryId").removeAttr("disabled");
            $("#F_IndustryId").css("background-color", "#fff");


        } else {
            $("#F_IndustryId").attr("disabled", "disabled");
            $("#F_IndustryId").css("background-color", "#ddd");

            $("#F_CompanyType").removeAttr("disabled");
            $("#F_CompanyType").css("background-color", "#fff");
            $("#F_MappingId").removeAttr("disabled");
            $("#F_MappingId").css("background-color", "#fff");
        }
    }

    function submitForm() {
        if (!$('#projectForm').formValid()) {
            return false;
        }

        var F_ClientType = $("#F_ClientType").val();
        var hd_ClientName = $("#hd_ClientName").val();
        var txtF_ClientName = $("#F_ClientName").val();
        var F_ClientName = hd_ClientName == "" ? txtF_ClientName : hd_ClientName;
        var F_CompanyType = $("#F_CompanyType").val();

        var F_ClientLevel = $("#F_ClientLevel").val();
        var F_CityId = $("#F_CityId").val();
        var F_AreaId = $("#F_AreaId").val();

        var F_Address = $("#F_Address").val();
        var F_IndustryId = $("#F_IndustryId").val();

        var hd_F_MappingId = $("#hd_F_MappingId").val();
        var txtF_MappingId = $("#F_MappingId").val();
        var F_MappingId = "";
        var F_ClientType2 = $("#F_ClientType").val();
        if (F_ClientType2 == "1") {
            F_MappingId = F_ClientName;
        } else {
            F_MappingId = hd_F_MappingId == "" ? txtF_MappingId : hd_F_MappingId;
        }

        var hd_F_ProjectId = $("#hd_ProjectId").val();
        var txtF_ProjectId = $("#F_ProjectId").val();
        var F_ProjectId = hd_F_ProjectId == "" ? txtF_ProjectId : hd_F_ProjectId;
        var F_Contact = $("#F_Contact").val();

        var F_DepartmentId = $("#F_DepartmentId").val();
        var F_PositionId = $("#F_PositionId").val();
        var F_Sex = $("input[name='F_Sex']:checked").val();

        var F_Phone = $("#F_Phone").val();
        var F_Telephone = $("#F_Telephone").val();
        var F_Mail = $("#F_Mail").val();

        var F_ActivityTheme = $("#F_ActivityTheme").val();
        var F_ActivityType = $("#F_ActivityType").val();
        var F_DemandCash = $("#F_DemandCash").val();

        var F_ActivityStartDate = $("#F_ActivityStartDate").val();
        var F_ActivityEndDate = $("#F_ActivityEndDate").val();

        var F_ACityIdList = $("#F_ActivityCityId").select2("data");
        var F_ActivityCityId = "";
        for (var i = 0; i < F_ACityIdList.length; i++) {
            if (i == F_ACityIdList.length - 1) {
                F_ActivityCityId += F_ACityIdList[i].id;
            } else {
                F_ActivityCityId += F_ACityIdList[i].id + ",";
            }
        }
        var F_PersionNumber = $("#F_PersionNumber").val();
        var F_SiteType = $("#F_SiteType").val();
        var F_SiteArea = $("#F_SiteArea").val();
        var F_Height = $("#F_Height").val();
        var F_Note = $("#F_Note").val();
        var F_Mark = $("#F_Mark").val();
        var F_State = $("input[name='F_State']:checked").val();
        var F_Source = $("#F_Source").val();
        $.submitForm({
            url: "/ClientManager/DemandInfos/SubmitForm",
            param: {
                F_ClientType: F_ClientType, F_ClientId: F_ClientName, F_CompanyType: F_CompanyType, F_ClientLevel: F_ClientLevel, F_CityId: F_CityId,
                F_AreaId: F_AreaId, F_Address: F_Address, F_IndustryId: F_IndustryId, F_MappingId: F_MappingId, F_ProjectId: F_ProjectId,
                F_Contact: F_Contact, F_DepartmentId: F_DepartmentId, F_PositionId: F_PositionId, F_Sex: F_Sex, F_Phone: F_Phone,
                F_Telephone: F_Telephone, F_Mail: F_Mail, F_ActivityTheme: F_ActivityTheme, F_ActivityType: F_ActivityType, F_DemandCash: F_DemandCash,
                F_ActivityStartDate: F_ActivityStartDate, F_ActivityEndDate: F_ActivityEndDate, F_ActivityCityId: F_ActivityCityId, F_SiteType: F_SiteType, F_SiteArea: F_SiteArea,
                F_Height: F_Height, F_Note: F_Note, F_Mark: F_Mark, F_State: F_State,
                F_Source: F_Source, F_Id: F_Id, contactId: contactId, F_PersionNumber: F_PersionNumber
            },
            success: function () {
                $.currentWindow().$("#gridList").trigger("reloadGrid");
            }
        });
    }
</script>
<div id="ProjectsDetail">
    <form id="projectForm">
        <table class="form">
            <tr>
                <td colspan="6" class="interval">公司基本资料</td>
            </tr>
            <tr>
                <td colspan="6">
                    <table class="form">
                        <tr>
                            <td class="formTitle">客户类型</td>
                            <td class="formValue">
                                <select id="F_ClientType" name="F_ClientType" disabled="disabled" class="form-control" onchange="ChangeClientType()">
                                    <option value="">==请选择客户类型==</option>
                                </select>
                            </td>
                            <td class="formTitle">客户名称<span style="color:red;font-weight:bold;font-size:14px;">*</span></td>
                            <td class="formValue">
                                <div class="input-group" style="width:100%;">
                                    <input type="text" id="F_ClientName" disabled="disabled" class="form-control required" placeholder="请输入客户名称" />
                                    <span class="input-group-addon"><i class="glyphicon glyphicon-search"></i></span>
                                    <input type="hidden" name="hd_ClientName" id="hd_ClientName" value="" />
                                </div>
                            </td>
                            <td class="formTitle">公司类型</td>
                            <td class="formValue">
                                <select id="F_CompanyType" disabled="disabled" name="F_CompanyType" class="form-control">
                                    <option value="">==请选择客户类型==</option>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <td class="formTitle">客户等级</td>
                            <td class="formValue">
                                <select id="F_ClientLevel" disabled="disabled" name="F_ClientLevel" class="form-control required">
                                    <option value="">==请选择客户等级==</option>
                                </select>
                            </td>
                            <td class="formTitle">所在城市</td>
                            <td class="formValue">
                                <select id="F_CityId" name="F_CityId" disabled="disabled" class="form-control required" onchange="ChangeCityData()">
                                    <option value="">==请选择城市==</option>
                                </select>
                            </td>
                            <td class="formTitle">行政区域</td>
                            <td class="formValue">
                                <select id="F_AreaId" name="F_AreaId" disabled="disabled" class="form-control required">
                                    <option value="">==请选择行政区域==</option>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <td class="formTitle">公司地址</td>
                            <td class="formValue">
                                <input type="text" id="F_Address" disabled="disabled" class="form-control" placeholder="请输入公司地址" />
                            </td>
                            <td class="formTitle">所属行业</td>
                            <td class="formValue">
                                <select id="F_IndustryId" disabled="disabled" name="F_IndustryId" class="form-control">
                                    <option value="">==请选择行业==</option>
                                </select>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td colspan="6" class="interval">客户需求信息</td>
            </tr>
            <tr>
                <td colspan="6">
                    <table class="form">
                        <tr>
                            <td class="formTitle">需求来源</td>
                            <td class="formValue">
                                <select id="F_Source" name="F_Source" class="form-control required">
                                    <option value="">==请选择需求来源==</option>
                                    <option value="0">400电话</option>
                                    <option value="1">销售自拓</option>
                                    <option value="2">网站下单</option>
                                    <option value="3">小程序订单</option>
                                    <option value="4">App订单</option>
                                </select>
                            </td>
                            <td class="formTitle">所属行业</td>
                            <td class="formValue">
                                <select id="F_ZkIndustryId" name="F_ZkIndustryId" class="form-control">
                                    <option value="">==请选择行业==</option>
                                </select>
                            </td>
                            <td class="formTitle">活动主题<span style="color:red;font-weight:bold;font-size:14px;">*</span></td>
                            <td class="formValue">
                                <input type="text" id="F_ActivityTheme" disabled="disabled" class="form-control required" placeholder="请输入活动主题" />
                            </td>
                                                      
                        </tr>
                        <tr>
                            <td class="formTitle">活动类型<span style="color:red;font-weight:bold;font-size:14px;">*</span></td>
                            <td class="formValue">
                                <select id="F_ActivityType" disabled="disabled" class="form-control select2-container select2-container--default select2-container--open required">
                                    <option value="">==请选择活动类型==</option>
                                </select>
                            </td> 
                            <td class="formTitle">搭建日期</td>
                            <td class="formValue">
                                <input type="text" id="F_BuildDate" name="F_BuildDate" class="form-control input-wdatepicker" onfocus="WdatePicker()" placeholder="请输入活动搭建日期" />
                            </td>                            
                            <td class="formTitle">活动开始时间<span style="color:red;font-weight:bold;font-size:14px;">*</span></td>
                            <td class="formValue">
                                <input type="text" id="F_ActivityStartDate" disabled="disabled" class="form-control input-wdatepicker required" onfocus="WdatePicker()" placeholder="请输入活动开始时间" />
                            </td>                                                    
                        </tr>
                        <tr>
                            <td class="formTitle">预算金额</td>
                            <td class="formValue">
                                <input type="text" id="F_DemandCash" disabled="disabled" class="form-control required" placeholder="请输入预算金额" />
                            </td>
                            <td class="formTitle">活动结束时间</td>
                            <td class="formValue">
                                <input type="text" id="F_ActivityEndDate" disabled="disabled" class="form-control input-wdatepicker required" onfocus="WdatePicker()" placeholder="请输入活动结束时间" />
                            </td>    
                            <td class="formTitle">活动城市</td>
                            <td class="formValue">
                                <select id="F_ActivityCityId" disabled="disabled" class="form-control required">
                                    <option value="">==请选择活动城市==</option>
                                </select>
                            </td>                                                     
                        </tr>
                        <tr>
                            <td class="formTitle">场地类型</td>
                            <td class="formValue">
                                <select id="F_SiteType" name="F_SiteType" class="form-control required">
                                    <option value="">==请选择场地类型==</option>
                                </select>
                            </td>
                            <td class="formTitle">活动人数</td>
                            <td class="formValue">
                                <input type="text" id="F_PersionNumber" name="F_PersionNumber" class="form-control number" placeholder="请输入活动人数" />
                            </td>  
                            <td class="formTitle">场地面积(㎡)</td>
                            <td class="formValue">
                                <input type="text" id="F_SiteArea" name="F_SiteArea" class="form-control number" placeholder="请输入场地面积" />
                            </td>                                                     
                        </tr>
                        <tr>
                            <td class="formTitle">层高</td>
                            <td class="formValue">
                                <input type="text" id="F_Height" name="F_Height" class="form-control number" placeholder="请输入层高" />
                            </td>
                            <td class="formTitle"></td>
                            <td class="formValue"></td>  
                            <td class="formTitle"></td>
                            <td class="formValue"></td>
                        </tr>
                        <tr>
                            <td class="formTitle">备注</td>
                            <td class="formValue" colspan="5">
                                <textarea rows="3" id="F_Note" disabled="disabled" class="form-control" placeholder="请输入备注信息" style="width:99%;"></textarea>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td colspan="6" class="interval">品牌项目组信息</td>
            </tr>
            <tr>
                <td colspan="6">
                    <table class="form">
                        <tr>
                            <td class="formTitle">直客名称</td>
                            <td class="formValue">
                                <div class="input-group" style="width:100%;">
                                    <input type="text" id="F_MappingId" class="form-control" placeholder="请输入直客名称" />
                                    <span class="input-group-addon"><i class="glyphicon glyphicon-search"></i></span>
                                    <input type="hidden" name="hd_F_MappingId" id="hd_F_MappingId" value="" />
                                </div>
                            </td>
                            <td class="formTitle">品牌名称</td>
                            <td class="formValue">
                                <div class="input-group" style="width:100%;">
                                    <input type="text" id="F_BrandId" class="form-control" placeholder="请输入品牌名称" />
                                    <span class="input-group-addon"><i class="glyphicon glyphicon-search"></i></span>
                                    <input type="hidden" name="hd_F_BrandId" id="hd_F_BrandId" value="" />
                                </div>
                            </td>
                            <td class="formTitle">所属项目组</td>
                            <td class="formValue">
                                <div class="input-group" style="width:100%;">
                                    <input type="text" id="F_ProjectId" class="form-control" placeholder="请输入项目组" />
                                    <span class="input-group-addon"><i class="glyphicon glyphicon-search"></i></span>
                                    <input type="hidden" name="hd_F_ProjectId" id="hd_F_ProjectId" value="" />
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td class="formTitle">联系人</td>
                            <td class="formValue">
                                <div class="input-group" style="width:100%;">
                                    <input type="text" id="F_Contact" name="F_Contact" class="form-control required" placeholder="请输入联系人" />
                                    <span class="input-group-addon"><i class="glyphicon glyphicon-search"></i></span>
                                    <input type="hidden" name="hd_F_Contact" id="hd_F_Contact" value="" />
                                </div>
                            </td>
                            <td class="formTitle">所属部门</td>
                            <td class="formValue">
                                <select id="F_DepartmentId" name="F_DepartmentId" class="form-control">
                                    <option value="">==请选择部门==</option>
                                </select>
                            </td>
                            <td class="formTitle">所属职位</td>
                            <td class="formValue">
                                <select id="F_PositionId" name="F_PositionId" class="form-control">
                                    <option value="">==请选择职位==</option>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <td class="formTitle">性别</td>
                            <td class="formValue">
                                <input type="radio" name="F_Sex" value="1" />男<input type="radio" name="F_Sex" value="0" />女
                            </td>
                            <td class="formTitle">手机号码</td>
                            <td class="formValue">
                                <input type="text" id="F_Phone" class="form-control required" placeholder="请输入手机号" />
                            </td>
                            <td class="formTitle">公司座机</td>
                            <td class="formValue">
                                <input type="text" id="F_Telephone" class="form-control" placeholder="请输入公司座机" />
                            </td>
                        </tr>
                        <tr>
                            <td class="formTitle">Email</td>
                            <td class="formValue">
                                <input type="text" id="F_Mail" class="form-control required" placeholder="请输入Email" />
                            </td>
                            <td class="formTitle"></td>
                            <td class="formValue"></td>
                            <td class="formTitle"></td>
                            <td class="formValue"></td>
                        </tr>
                    </table>
                </td>
            </tr>            
            <tr>
                <td colspan="6" class="interval">跟进人备注</td>
            </tr>
            <tr>
                <td colspan="6">
                    <table class="form">
                        <tr>
                            <td class="formTitle">需求单状态变更</td>
                            <td class="formValue" colspan="5">
                                <input type="radio" name="F_State" disabled="disabled" value="0" />草稿 <input disabled="disabled" type="radio" name="F_State" value="1" />转订单 <input type="radio" name="F_State" value="2" />无效
                            </td>
                        </tr>
                        <tr>
                            <td class="formTitle">反馈信息</td>
                            <td class="formValue" colspan="5">
                                <textarea rows="3" id="F_Mark" disabled="disabled" class="form-control" placeholder="请输入反馈信息" style="width:99%;"></textarea>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td colspan="6" class="interval">客户历史记录</td>
            </tr>
            <tr>
                <td colspan="6">
                    <div class="zdyGirdPanel">
                        <table id="gridList"></table>
                        <div id="gridPager"></div>
                    </div>
                </td>
            </tr>
        </table>
    </form>
</div>
